Skip to content

revert: remove client-side Sentry (#642)#647

Closed
BigSimmo wants to merge 1 commit into
mainfrom
claude/remove-client-sentry
Closed

revert: remove client-side Sentry (#642)#647
BigSimmo wants to merge 1 commit into
mainfrom
claude/remove-client-sentry

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Reverts the client-side Sentry integration merged in #642, as requested. Removes:

  • @sentry/browser dependency
  • the same-origin tunnel route src/app/api/monitoring/route.ts
  • src/lib/observability/sentry-client.ts + sentry-scrub.ts and tests/sentry-client.test.ts
  • the gated client init in src/instrumentation-client.ts (back to just the Zod jitless config) and the __SENTRY_ENABLED__ DefinePlugin in next.config.ts
  • NEXT_PUBLIC_SENTRY_DSN / NEXT_PUBLIC_SENTRY_ENVIRONMENT from env.ts
  • the captureClientException wiring in the route + global error boundaries

Server-side error capture is untouched@sentry/node via src/lib/observability/error-capture.ts + src/instrumentation.ts (gated on SENTRY_DSN) predates #642 and remains, fully inert without a DSN.

Done as a clean git revert of the #642 squash commit (71d9f2c76); no conflicts.

Verification

  • typecheck, lint — clean
  • build — exit 0; no @sentry / sentry-scrub / sentry-client / __SENTRY_ENABLED__ in the client bundle; /api/monitoring route absent from build output
  • test — 2298 pass (the 3 "failures" were Test timed out flakes from a concurrent build starving the AST-graph tests; both files pass 10/10 when re-run in isolation)
  • ✅ No lingering client-Sentry references anywhere in src/tests/next.config.ts

Clinical Governance Preflight

N/A — removes an observability integration; no ingestion, answer generation, search, privacy, or clinical output behavior changes. (The client tunnel and its public DSN are gone; server capture behavior is unchanged.)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes

    • Removed client-side error reporting to Sentry; application errors are now logged locally while existing recovery options remain available.
    • Removed the monitoring endpoint used to forward error reports.
    • Removed related Sentry browser configuration and environment settings.
  • Documentation

    • Updated the API route documentation to remove the retired monitoring endpoint.

Reverts the gated client-side @sentry/browser integration merged in #642:
tunnel route (/api/monitoring), client init/scrubber/holder, error-boundary
capture wiring, NEXT_PUBLIC_SENTRY_DSN env, the DefinePlugin gate, and the
@sentry/browser dependency.

Server-side error capture (@sentry/node via src/lib/observability/error-capture.ts
+ src/instrumentation.ts, gated on SENTRY_DSN) is unaffected — it predates #642.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@supabase

supabase Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 14, 2026 08:54
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e6a20fc0-3e35-4020-9955-46f177ac8b55

📥 Commits

Reviewing files that changed from the base of the PR and between 550e058 and 8d54ddc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • docs/site-map.md
  • next.config.ts
  • package.json
  • src/app/api/monitoring/route.ts
  • src/app/global-error.tsx
  • src/components/route-error-boundary.tsx
  • src/instrumentation-client.ts
  • src/lib/env.ts
  • src/lib/observability/sentry-client.ts
  • src/lib/observability/sentry-scrub.ts
  • tests/sentry-client.test.ts

📝 Walkthrough

Walkthrough

The PR removes client-side Sentry reporting, its browser dependency and configuration, the monitoring API route, and the related environment variables. Error boundaries retain console logging and existing fallback UI behavior.

Changes

Sentry integration removal

Layer / File(s) Summary
Remove client error reporting
src/app/global-error.tsx, src/components/route-error-boundary.tsx, src/instrumentation-client.ts
Error boundaries no longer capture exceptions through Sentry, and client instrumentation retains only Zod’s jitless configuration.
Clean up Sentry configuration
next.config.ts, src/lib/env.ts, package.json, docs/site-map.md
The Sentry build-time flag, browser dependency, client environment variables, and monitoring route sitemap entry are removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/remove-client-sentry

Comment @coderabbitai help to get the list of available commands.

@BigSimmo

Copy link
Copy Markdown
Owner Author

Superseded by #645 (550e05888, "Remove Sentry error capture integration"), which already landed on main and removes Sentry more completely than this revert — it drops both the client-side integration from #642 and the pre-existing server-side @sentry/node capture (error-capture.ts, the instrumentation.ts init, SENTRY_DSN). Main is now fully Sentry-free, so this client-only revert is redundant. Closing.

@BigSimmo BigSimmo closed this Jul 14, 2026
auto-merge was automatically disabled July 14, 2026 08:58

Pull request was closed

@BigSimmo
BigSimmo deleted the claude/remove-client-sentry branch July 14, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant